namespace Vin.Extension.Framework.Attributes;

/// <summary>
/// 忽略序列化规则 (只能放在类或者属性字段上)
/// </summary>
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false)]
public class IgnoreSerializerRuleAttribute : Attribute
{
    public HashSet<string> Properties { get; set; } = new();

    public IgnoreSerializerRuleAttribute()
    {
    }

    public IgnoreSerializerRuleAttribute(params string[] properties)
    {
        Properties = properties.ToHashSet();
    }
}